package data.result;

import data.cad.CAD;
import data.component.Wall;
import data.xml.XML;
import utils.Matrix;

import java.util.ArrayList;
import java.util.HashMap;

public class MeasureData {
    /**房间数据*/
    public MeasureSurface room;

    /**天花板数据*/
    public ArrayList<MeasureSurface> ceiling;

    /**地板数据*/
    public MeasureSurface floor;

    /**墙面数据*/
    public ArrayList<MeasureSurface> walls;

    /**多面墙数据（如阴阳角）*/
    public ArrayList<MeasureSurface> multiwalls;

    /**门窗数据*/
    public ArrayList<MeasureSurface> openings;

    public void SetMeasureData(CAD cad, XML xml, HashMap<String, Wall> map, Matrix matrix, Double angle)
    {
        room.CompleteRoomSurface(cad,xml, map, matrix, angle);
        ceiling.forEach(c ->c.CompleteCeilingSurface(cad,xml, map, matrix, angle));
        floor.CompleteFloorSurface(cad,map, matrix, angle);
        walls.forEach(w->w.CompleteWallSurface(cad, map, matrix, angle));
        multiwalls.forEach(w ->w.CompleteMultiWallSurface(cad, map, matrix, angle));
        var  wallOpeningCount = new HashMap<String, Integer>();
        openings.forEach(o->o.CompleteOpeningSurface(cad, map, matrix, angle, wallOpeningCount));
    }
}
